package com.dhcc.bpm.modules.metadata.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dhcc.bpm.common.text.Convert;
import com.dhcc.bpm.modules.metadata.entity.GateMetadata;
import com.dhcc.bpm.modules.metadata.mapper.GateMetadataMapper;
import com.dhcc.bpm.modules.metadata.service.IGateMetadataService;
import com.dhcc.bpm.modules.metadata.vo.GateMetadataVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName GateMetadataServiceImpl
 * @Description 网关路由元数据关联表 服务实现类
 * @Author daina
 * @Date 2020/2/21 14:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */
@Service("opc_gate_metadata")
public class GateMetadataServiceImpl extends ServiceImpl<GateMetadataMapper, GateMetadata> implements IGateMetadataService {
	@Autowired
	private GateMetadataMapper gateMetadataMapper;
	@Override
	public IPage<GateMetadataVO> selectGateMetadataPage(IPage<GateMetadataVO> page, GateMetadataVO gateMetadata) {
		return page.setRecords(baseMapper.selectGateMetadataPage(page, gateMetadata));
	}
	@Override
	public int deleteGateMetadata(Long opcGatewayId, String ids) {
		return gateMetadataMapper.deleteGateMetadata(opcGatewayId, Convert.toLongArray(ids));
	}
}
